***Analysis run using Stata14***
***Load In Data***
***use Replication Data-Women in Uniform.dta***

***Set-Up Data***
stset DurSeg_1970, failure(ground_combat==1) id(ccode)


***Table 1--Main Manuscript***
***Analysis***
***Cox PH Models***

***Women's Political Participation***
stcox v2x_genpp sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

***Women's Civil Society Participation***
stcox v2x_gencs sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

***Fertility_Rates***
stcox fertility_rate sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

***Female Labor Force Participation--Variable not Available Until 1990***
drop if year < 1990
stset DurSeg_1990, failure(ground_combat==1) id(ccode)

stcox female_labor_force_total sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

clear


***Figures 1-2***
***Y-Axis Scale, Titles, Captions, Font Sizes, and Colors Changed in Graph Editor***
***use Replication Data-Women in Uniform.dta***

***Set-Up Data***
stset DurSeg_1970, failure(ground_combat==1) id(ccode)


***Figure 1: Women's Political Participation***
sts graph, fail by(PP75) ci level(90) legend (order(2 4))


***Women's Civil Society Participation***
sts graph, fail by (CS75) ci level(90) 

clear

****Online Appendix****
***Robustness Checks***
***use Replication Data-Women in Uniform.dta***

***Appendix Table 2-Summary Statistics****
sum v2x_genpp v2x_gencs fertility_rate female_labor_force_total sr_binary log_milgdp polity2 ln_gdp_pc nato , detail


***Table 3***
***CIRI Measures--Variable not Available Until 1981***
drop if year < 1981 
stset DurSeg_1981, failure(ground_combat==1) id(ccode)

stcox wosoc sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

stcox wopol sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

stcox wecon sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

clear


***Dropping Eritrea and Israel***
***use Replication Data-Women in Uniform.dta***

stset DurSeg_1970, failure(ground_combat==1) id(ccode)

***Appendix Table 4***
***Dropping Israel***
drop if ccode == 666

stcox v2x_genpp sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode)  nohr

stcox v2x_gencs sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode)  nohr

stcox fertility_rate sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode)  nohr

***Female Labor Force Participation--Variable not Available Until 1990***
drop if year < 1990
stset DurSeg_1990, failure(ground_combat==1) id(ccode)

stcox female_labor_force_total sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode)  nohr

clear


***Appendix Table 5***
***Dropping Eritrea***
***use Replication Data-Women in Uniform.dta***

stset DurSeg_1970, failure(ground_combat==1) id(ccode)

drop if ccode == 531

stcox v2x_genpp sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode)  nohr

stcox v2x_gencs sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode)  nohr

stcox fertility_rate sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode)  nohr

***Female Labor Force Participation--Variable not Available Until 1990***
drop if year < 1990
stset DurSeg_1990, failure(ground_combat==1) id(ccode)

stcox female_labor_force_total sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode)  nohr

clear


***Appendix Table 6***
***All Independent Variables Lagged by One Year***
***use Replication Data-Women in Uniform.dta***

stset DurSeg_1970, failure(ground_combat==1) id(ccode)

stcox v2x_genpp_lag1 sr_binary_lag1 log_milgdp_lag1 polity2_lag1 ln_gdp_pc_lag1 nato_lag1, cl(ccode) nohr

stcox v2x_gencs_lag1 sr_binary_lag1 log_milgdp_lag1 polity2_lag1 ln_gdp_pc_lag1 nato_lag1, cl(ccode) nohr

stcox fertility_rate_lag1 sr_binary_lag1 log_milgdp_lag1 polity2_lag1 ln_gdp_pc_lag1 nato_lag1, cl(ccode) nohr

***Female Labor Force Participation--Variable not Available Until 1990***
drop if year < 1990
stset DurSeg_1990, failure(ground_combat==1) id(ccode)

stcox female_labor_force_total_lag1 sr_binary_lag1 log_milgdp_lag1 polity2_lag1 ln_gdp_pc_lag1 nato_lag1, cl(ccode) nohr

clear


***Appendix Table 7***
***Controlling for Conscription--Variable not Available after 2008***
***use Replication Data-Women in Uniform.dta***
drop if year > 2008

stset DurSeg_1970, failure(ground_combat==1) id(ccode)

stcox v2x_genpp recruit sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

stcox v2x_gencs recruit sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

stcox fertility_rate recruit sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

***Female Labor Force Participation--Variable not Available Until 1990***
drop if year < 1990
stset DurSeg_1990, failure(ground_combat==1) id(ccode)

stcox female_labor_force_total recruit sr_binary log_milgdp polity2 ln_gdp_pc nato, cl(ccode) nohr

clear
